﻿<!DOCTYPE html>
<html>
	<meta charset="UTF-8"/>
	<head>
		<script>
			//信息的打包
			
			
			function Person(){
			}
			
			//构造函数
			var p = new Person();
			p.name = "zhangsan";
			p.talk = function(){
				console.log("你好");
			}
			
			p.talk();
			
			//JavaScript Object Notation
			var p2 = {
				name : "lisi",
				sex : "男",
				eat : function(){
					console.log("吃！");
				},
				talk : function(){
					console.log("说！");
				}
			};
			console.log(p2.name);
			p2.talk();
			
			
			
		</script>
	</head>
	<body>
		
	
	</body>	
</html>











